﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

namespace SCS.Web.UI.WebControls.Test
{
    public partial class GenericMarkupTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            HtmlLink styleLink = null;

            foreach (Control c in Page.Header.Controls)
            {
                if (c is HtmlLink)
                    styleLink = (HtmlLink)c;
            }

            if (styleLink != null)
            {
                styleLink.Href = string.Format("styles/menu-{0}.css", menuTypeSelect.SelectedValue);
                MediaOutlineExtender.MenuCssClass = string.Format("menu-{0}", menuTypeSelect.SelectedValue.ToLower());
            }
        }
    }
}